package com.lysj.admin.master.common.exception;


import com.lysj.admin.master.common.web.Resp;
import lombok.Getter;

/**
 * @author zk
 * @description
 * @create 2018-07-27 10:13
 **/
@Getter
public class BaseException extends RuntimeException {

    private String msg;
    private Integer code;

    public BaseException(Resp.ResStatus code) {
        super(code.getStatus());
        this.code = code.getCode();
    }

    public BaseException(Resp.ResStatus code, String msg) {
        super(msg);
        this.code = code.getCode();
    }

    public BaseException(String msg) {
        super(msg);
        this.msg = msg;
    }
}
